In a heat engine or heat pump, a heat exchanger may be employed to transfer heat between a thermal storage material and a working fluid for use with turbomachinery. The heat engine may be reversible, e.g., it may also be a heat pump, and the working fluid and heat exchanger may be used to transfer heat or cold to a plurality of thermal stores. The thermal energy within a given system may be stored in various forms and in a variety of containers, including pressure vessels and/or insulated vessels.